<template>
  <div class="layoutHome-wrap">
    <div class="layout-assist-wrap">
      <span class="layout-assit-shrink" v-if="!inHideAssist" @click="toShrinkAssit"></span>
      <span class="layout-assit-shrink layout-assit-open" v-else @click="toShrinkAssit"></span>
      <!--right start-->
      <WzxqyfbAssist v-if="!inHideAssist"></WzxqyfbAssist>
      <!--right edn-->
      <yjwzmap-select></yjwzmap-select>
    </div>

    <div class="layout-sidebar-wrap">
      <span class="layout-sidebar-shrink" v-if="!isHideSidebar" @click="toShrink"></span>
      <span class="layout-sidebar-shrink layout-sidebar-open" v-else @click="toShrink"></span>
      <!--left start-->
      <wzxqyfb-sidebar v-if="!isHideSidebar"></wzxqyfb-sidebar>
      <!--left edn-->

    </div>


    <!-- <div class="layout-main-wrap"> -->
      <!--main start-->
      <!-- <layout-main></layout-main> -->
      <!-- <yjwzmap-select></yjwzmap-select> -->
      <!--main edn-->
    <!-- </div> -->
    <wz-lengend></wz-lengend>
  </div>
</template>
<script lang="ts">
import { Component, Vue, Prop } from 'vue-property-decorator';
import WzxqyfbAssist from '@/views/wsyj/WzxqyfbModule/WzxqyfbAssist.vue';
import layoutMain from '@/views/classic/LayoutMain.vue';
import WzxqyfbSidebar from '@/views/wsyj/WzxqyfbModule/WzxqyfbSidebar.vue';
import YjwzmapSelect from '@/components/feature/WzxqyfbModule/Yjwzmapselect.vue';
import WzLengend from '@/components/common/gis/lengend/Wzlengend.vue';
@Component({
  name: 'YjwzfbHome',
  components: {
    layoutMain,
    WzxqyfbSidebar,
    WzxqyfbAssist,
    YjwzmapSelect,
    WzLengend
  }
})
export default class YjwzfbHome extends Vue {
  private isHideSidebar = false;
  private inHideAssist = false;
  private toShrink() {
    this.isHideSidebar = !this.isHideSidebar;
  }
  private toShrinkAssit() {
    this.inHideAssist = !this.inHideAssist;
    this.$store.dispatch('layoutModule/isHideAssistEmit', this.inHideAssist);
  }
  private beforeDestroy() {
    this.$store.state['WzxqyfbModule' as any].wzxqyfbMap.unload();
  }
}
</script>
<style lang="less" scoped>
@import url('../../../assets/css/Layout.less');
</style>
